//
//  LayerTable.h
//  lhq
//
//  Created by codin on 14-7-24.
//
//

#ifndef __lhq__LayerTable__
#define __lhq__LayerTable__

#include "cocos2d.h"
#include "pomelo.h"
#include "CCPomelo.h"
#include "LayerCard.h"
#include "GamePlayer.h"




class LayerTable : public cocos2d::Layer {
public:
    static cocos2d::Scene* createScene();
    

	// static cocos2d::Scene* createScene(PomeloReponse * tRes);
    virtual bool init();
    void initView();
	void addPlayerBtns();
	void initNet();

    CREATE_FUNC(LayerTable);

	void onPlayerToOperate(cocos2d::CCNode *node, void *resp);
	void onPlayerOutCard(cocos2d::CCNode *node, void *resp);
	void onPlayerChi(cocos2d::CCNode *node, void *resp);
	void onPlayerPeng(cocos2d::CCNode *node, void *resp);
	void onPlayerPao(cocos2d::CCNode *node, void *resp);
	void onEnter();
	int positionToLocation(int position);
	void showOperateBtns(OPERATE operateCode);

	void onGuoClick(CCObject * sender);
	void onChiClick(CCObject * sender);
	LayerCard *m_layer_card;
	int myposition;
	int playerCount;
};


#endif /* defined(__lhq__LayerTable__) */
